package com.sdry.service.impl.permission;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.entity.permission.UpmsRolePermission;
import com.sdry.mapper.permission.UpmsRolePermissionMapper;
import com.sdry.service.permission.UpmsRolePermissionService;

/**
 * 
 * @ClassName:UpmsRolePermissionServiceImpl
 * @Description:角色+权限实现
 * @Author tdd
 * @Date 2018年7月30日下午2:35:10
 * @version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UpmsRolePermissionServiceImpl implements UpmsRolePermissionService {

	/**注入角色+权限Mapper*/
    @Resource UpmsRolePermissionMapper  upmsRolePermissionMapper;
    /**
     * 根据主键拼接的字符串删除 角色+权限返回影响行数
    */
    public Integer delete(String ids) {
        return upmsRolePermissionMapper.delete(ids);
    }
    /**
     * 条件分页查询角色+权限
    */
    public List<UpmsRolePermission> findPageByMution(UpmsRolePermission upmsRolePermission){
        return upmsRolePermissionMapper.findPageByMution(upmsRolePermission);
    }
    /**
     * 插入返回角色+权限id
    */
    public Long insert(UpmsRolePermission upmsRolePermission){
        return upmsRolePermissionMapper.insert(upmsRolePermission);
    }
    /**
     * 条件查询角色+权限
    */
    public List<UpmsRolePermission> queryAllByMution(UpmsRolePermission upmsRolePermission){
        return upmsRolePermissionMapper.queryAllByMution(upmsRolePermission);
    }
    /**
     * 根据id查询角色+权限
    */
    public UpmsRolePermission queryById(Long id){
        return upmsRolePermissionMapper.queryById(id);
    }
    /**
     * 条件查询角色+权限总条数
    */
    public Integer selectCountByMution(UpmsRolePermission upmsRolePermission){
        return upmsRolePermissionMapper.selectCountByMution(upmsRolePermission);
    }
    /**
     * 根据主键更新 角色+权限返回影响行数
    */
    public Integer update(UpmsRolePermission upmsRolePermission){
        return upmsRolePermissionMapper.update(upmsRolePermission);
    }
}